<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="${ctxStatic}/layui-v2.5.6/layui/css/layui.css">
<!--    <link type="text/css" rel="stylesheet" href="layui/css/layui.css" />
   -->
  <script type="text/javascript" src="${ctxStatic}/layui-v2.5.6/layui/layui.js"></script>
  
 </head>
<body>

<div style="margin: 10px;">

   
	<form class="layui-form layui-form-pane" lay-filter="example">
	
	<div class="layui-form-item">
	 	 <input type="hidden" name="id">
	 </div> 
	 <div class="layui-form-item">
	   <label class="layui-form-label">项目支出名称：</label>
	     <div class="layui-input-inline">
	      <input type="text" name="expendName" id="expendName" autocomplete="off" class="layui-input">
	    </div>
	     <!-- <label class="layui-form-label">年份：</label>
	  
	    <div class="layui-input-inline">
	      <input type="text" name="year" id="year" autocomplete="off" class="layui-input">
	    </div>  --> 
	    
	      
	    <label class="layui-form-label">年份:</label>
	    <div class="layui-input-inline">
	      <select name="year" lay-search="" required  lay-verify="required">
	      	<option value="">请选择</option>
			<c:forEach items="${fns:getDictList('jx_projectPerformanceReport_year')}" var="year">
				<option value="${year.value}">${year.label}</option>
			</c:forEach>
		  </select>
	    </div>
	 </div>
	 <div class="layui-form-item">
	     <label class="layui-form-label">部门主管:</label>
			    <div class="layui-input-inline">
			      <input type="text" name="competentDepartment" id="competentDepartment" autocomplete="off" class="layui-input">
			    </div>
	    <label class="layui-form-label">实施单位:</label>
			    <div class="layui-input-inline">
			      <input type="text" name="enforceUnit" id="enforceUnit" autocomplete="off" class="layui-input">
			    </div>
	 </div>
	 <div class="layui-form-item">
	 		<label>项目预算:	</label>
	 </div>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <label>年初预算数(万元)</label>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	&nbsp;&nbsp;&nbsp;&nbsp;<label>全年预算数(万元)</label>
	 <label>项目预算</label>
	  <div class="layui-form-item">
	     <label class="layui-form-label">年度预算总额</label>
		      <div class="layui-input-inline">
		       	<input type="text" name="totalDeginningYearBudget" id="totalDeginningYearBudget" autocomplete="off" class="layui-input">
		      </div>
		 <label class="layui-form-label"> 年度预算总额全年初预算：</label>
		      <div class="layui-input-inline">
		      	 <input type="text" name="totalAnnualBudget" id="totalAnnualBudget" autocomplete="off" class="layui-input">
		      </div>
	  </div> 
	   <div class="layui-form-item">
	   	
	     <label class="layui-form-label">当年预算安排一年初预算：</label>
			    <div class="layui-input-inline">
			      <input type="text" name="dnBeginningYearBudgetLayout" id="dnBeginningYearBudgetLayout" autocomplete="off" class="layui-input">
			    </div>
		<label class="layui-form-label"> 当年预算总额一全年预算数：</label>
			    <div class="layui-input-inline">
			      <input type="text" name="dnAnnualBudgetLayout" id="dnAnnualBudgetLayout" autocomplete="off" class="layui-input">
			    </div> 
	  </div> 
	   
	 
	   <div class="layui-form-item">
		   <label class="layui-form-label">上年结转经费一年初预算数:</label>
			    <div class="layui-input-inline">
			      <input type="text" name="snBeginningYearCarryoverFunds" id="snBeginningYearCarryoverFunds" autocomplete="off" class="layui-input">
			    </div>
	     <label class="layui-form-label"> 上年结转经费一全年预算数：</label>
			    <div class="layui-input-inline">
			      <input type="text" name="snAnnualCarryoverFunds" id="snAnnualCarryoverFunds" autocomplete="off" class="layui-input">
			    </div> 
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">其他来源经费一年初预算数:</label>
			    <div class="layui-input-inline">
			      <input type="text" name="otherFundsBeginningYear" id="otherFundsBeginningYear" autocomplete="off" class="layui-input">
			    </div>
		<label class="layui-form-label"> 其他来源经费一全年初预算数：</label>
			    <div class="layui-input-inline">
			      <input type="text" name="otherFundsAnnual" id="otherFundsAnnual" autocomplete="off" class="layui-input">
			    </div>
	  </div>
	   <!--  <div class="layui-form-item"> -->
	   
		<!-- <label class="layui-form-label">本年度绩效目标：</label>
			    <div class="layui-input-inline">
			      <input type="text" name="annualPerformanceGoal" id="annualPerformanceGoal" autocomplete="off" class="layui-input">
			    </div> 
			    <div class="layui-input-block">
				  <textarea name="annualPerformanceGoal" placeholder="请输入内容" class="layui-textarea"></textarea>
				</div>
			     -->
		 <div class="layui-form-item layui-form-text">
				<label class="layui-form-label">本年度绩效目标:</label>
				<div class="layui-input-block">
				  <textarea name="annualPerformanceGoal" placeholder="请输入内容" class="layui-textarea"></textarea>
				</div>
		</div>  
	 <!--  </div> -->
	   
	  
	   <div class="layui-form-item">
	    <label class="layui-form-label">填报人:</label>
			    <div class="layui-input-inline">
			      <input type="text" name="fillInName" id="fillInName" autocomplete="off" class="layui-input">
			    </div>
			    
		
	     <label class="layui-form-label">填报日期:</label> 
			     <div class="layui-input-inline">
			      <input type="text" name="fillInDate" id="fillInDate" autocomplete="off" class="layui-input">
			    </div>  
		 
				  
				  <!--   <div class="layui-input-inline">
				     	 <input type="text" name="fillInDate" id="fillInDate" autocomplete="off" class="layui-input">
				    </div>   -->
		<!-- <label class="layui-form-label">联系电话：</label>
			    <div class="layui-input-inline">
			    	  	<input type="text" name="fillInPhone" id="fillInPhone" autocomplete="off" class="layui-input">
			    </div> -->
	<!-- 	 <label class="layui-form-label">联系电话:</label>
			    <div class="layui-input-inline">
			      <input type="text" name="fillInPhone" id="fillInPhone" autocomplete="off" class="layui-input">
			    </div> -->
				  
	    
	  </div>
	  
	  
	     <div class="layui-form-item">
	   <div>
	  	<label class="layui-form-label">联系电话：</label>
	  			<div	class="layui-input-inline">
	  				<input type="text" name="fillInPhone" id="fillInPhone" autocomplete="off" class="layui-input">
	  			</div>
	   
	  </div> 
	 
	<%--   <label class="layui-form-label">审批状态:</label>
			  <div class="layui-input-inline">
			      <select name="status" lay-search="" required  lay-verify="required">
			      	<option value="">请选择</option>
					<c:forEach items="${fns:getDictList('jx_projectPerformanceReport_status')}" var="0">
						<option value="${status.value}">${status.label}</option>
					</c:forEach>
				  </select>
			    </div>    --%> 
	  </div> 
	  <%-- 
	  <div class="layui-form-item">
	    <label class="layui-form-label"> 提交状态：</label>
			    <!-- <div class="layui-input-inline">
			      <input type="text" name="submitStatus" id="submitStatus" autocomplete="off" class="layui-input">
			    </div> -->
		<div class="layui-input-inline">
		      <select name="submitStatus" lay-search="" required  lay-verify="required">
		      	<option value="">请选择</option>
				<c:forEach items="${fns:getDictList('jx_projectPerformanceReport_submitStatus')}" var="submitStatus">
					<option value="${submitStatus.value}">${submitStatus.label}</option>
				</c:forEach>
			  </select>
	    </div>   
			    
			    
			    
	    <label class="layui-form-label">审批状态:</label>
			  <!--   <div class="layui-input-inline">
			      <input type="text" name="status" id="status" autocomplete="off" class="layui-input">
			    </div> -->
		<div class="layui-input-inline">
	      <select name="status" lay-search="" required  lay-verify="required">
	      	<option value="">请选择</option>
			<c:forEach items="${fns:getDictList('jx_projectPerformanceReport_status')}" var="status">
				<option value="${status.value}">${status.label}</option>
			</c:forEach>
		  </select>
	    </div>    
			    
			    
			    
			    
			    
			    
		<label class="layui-form-label">审批时间：</label>
	  			<div	class="layui-input-inline">
	  				<input type="text" name="approvalDate" id="approvalDate" autocomplete="off" class="layui-input">
	  			</div>
	  </div> --%>
	 <!--  <div class="layui-form-item">
	  	<label class="layui-form-label">审批内容：</label>
	  			<div	class="layui-input-inline">
	  				<input type="text" name="reply" id="reply" autocomplete="off" class="layui-input">
	  			</div>
	  </div> -->
	 <!--  <div class="layui-form-item layui-form-text">
				<label class="layui-form-label">审批内容:</label>
				<div class="layui-input-block">
				  <textarea name="reply" placeholder="请输入内容" class="layui-textarea"></textarea>
				</div>
		</div>   -->
	  <!-- <div class="layui-form-item">
	  	<label class="layui-form-label">审批时间：</label>
	  			<div	class="layui-input-inline">
	  				<input type="text" name="approvalDate" id="approvalDate" autocomplete="off" class="layui-input">
	  			</div>
	  </div> -->
	  <!-- <div class="layui-form-item">
	  	<label class="layui-form-label">创建时间：</label>
	  			<div	class="layui-input-inline">
	  				<input type="text" name="createDate" id="createDate" autocomplete="off" class="layui-input">
	  			</div>
	  	<label class="layui-form-label">更新者：</label>
	  			<div	class="layui-input-inline">
	  				<input type="text" name="updateBy" id="updateBy" autocomplete="off" class="layui-input">
	  			</div>
	  	<label class="layui-form-label">更新时间：</label>
	  			<div	class="layui-input-inline">
	  				<input type="text" name="updateDate" id="updateDate" autocomplete="off" class="layui-input">
	  			</div>
	  </div> -->
	   
	  <div class="layui-form-item">
	    <div class="layui-input-block">
	      <button class="layui-btn" id="submitBtn" lay-submit lay-filter="formDemo">立即提交</button>
	      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
	    </div>
	  </div>
	</form>
</div>
	 
  
<script>

layui.use(['form', 'laydate'], function(){
	var form = layui.form;
	var laydate = layui.laydate;
	var $ = layui.$;
	
	
	//日期
	 laydate.render({
	   elem: '#fillInDate',
	   trigger: 'click', //采用click弹出
	   value: new Date()
	});   
	 laydate.render({
		   elem: '#approvalDate',
		   trigger: 'click', //采用click弹出
		   value: new Date()
		}); 
	 laydate.render({
		   elem: '#createDate',
		   trigger: 'click', //采用click弹出
		   value: new Date()
		}); 
	 laydate.render({
		   elem: '#updateDate',
		   trigger: 'click', //采用click弹出
		   value: new Date()
		}); 
	
	//表单赋值
	form.val('example', {		
	     	 "id": "${projectPerformanceReport.id}"
			  ,"expendName": "${projectPerformanceReport.expendName}"
			  ,"year": "${projectPerformanceReport.year}"
			  ,"competentDepartment": "${projectPerformanceReport.competentDepartment}"
			  ,"enforceUnit": "${projectPerformanceReport.enforceUnit}"
			  ,"totalDeginningYearBudget": "${projectPerformanceReport.totalDeginningYearBudget}"
			  ,"totalAnnualBudget": "${projectPerformanceReport.totalAnnualBudget}"
			  ,"dnBeginningYearBudgetLayout": "${projectPerformanceReport.dnBeginningYearBudgetLayout}"	
			  ,"dnAnnualBudgetLayout": "${projectPerformanceReport.dnAnnualBudgetLayout}"
			  ,"snBeginningYearCarryoverFunds": "${projectPerformanceReport.snBeginningYearCarryoverFunds}"
			  ,"snAnnualCarryoverFunds": "${projectPerformanceReport.snAnnualCarryoverFunds}" 
		      ,"otherFundsBeginningYear": "${projectPerformanceReport.otherFundsBeginningYear}"	
		      ,"otherFundsAnnual": "${projectPerformanceReport.otherFundsAnnual}"	
		      ,"annualPerformanceGoal": "${projectPerformanceReport.annualPerformanceGoal}"	
		      ,"fillInName":"${projectPerformanceReport.fillInName}"
		      ,"fillInDate": "${projectPerformanceReport.fillInDate}"	 
		      ,"fillInPhone": "${projectPerformanceReport.fillInPhone}"		
		      ,"submitStatus": "${projectPerformanceReport.submitStatus}"	
		    	 /*  ,"updateBy": "${projectPerformanceReport.updateBy}" */
		      
		    	 
		      ,"status": "${projectPerformanceReport.status}"	
		      ,"reply": "${projectPerformanceReport.reply}"	
		      ,"approvalDate": "${projectPerformanceReport.approvalDate}"	
		      ,"createBy": "${projectPerformanceReport.createBy}"	
		     /*  ,"createDate": "${projectPerformanceReport.createDate}"	
		     	
		      ,"updateDate": "${projectPerformanceReport.updateDate}"	
		      ,"remarks": "${projectPerformanceReport.remarks}"	 */
		     
 });
	//监听提交
	form.on('submit(formDemo)', function(data){
		$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
		var aa = JSON.stringify(data.field);
		$.ajax({
            url: "${ctx}/jx/projectPerformanceReport/save",
            type: "POST",
            dataType: "json",
            data: {
            	dataString : aa
            },
            async: false,
            success: function(data){
                layer.msg(data,{time:1*500},function(){
                    var iframe_index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                    parent.layer.close(iframe_index); //再执行关闭      
                    parent.layui.table.reload('thisReloadId');
                });
            },
            error: function(){
            	layer.msg('保存失败', {icon: 2});
            	$('#submitBtn').removeClass("layui-btn-disabled").attr("disabled",false);
            }
        });
		return false;
	});
	
}); 
</script>


  

</body> 
</html>

